// map 存下所有 循环字符串 找到对应索引

function oneChar(s) {
    let map = {};
    for (const v of s) {
        map[v] = (map[v] || 0) + 1
    }
    for (let index = 0; index < s.length; index++) {
        if (map[s[index]] === 1) return index
    }
    return -1
}